package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.DeviceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface DeviceMapper extends BaseMapper<DeviceEntity> {

    @Select("select device_id, person_id from device where person_id = #{personId} limit 1")
    DeviceEntity selectFirst(String personId);
}
